/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package slic.model.impl;

import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;

import slic.model.CategoriaDisciplina;
import slic.model.Equipo;
import slic.service.CategoriaDisciplinaLocalServiceUtil;

/**
 * The extended model implementation for the Equipo service. Represents a row in the &quot;SLIC_Equipos&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link slic.model.Equipo} interface.
 * </p>
 *
 * @author Pablo Carballo
 */
public class EquipoImpl extends EquipoBaseImpl {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never reference this class directly. All methods that expect a Equipo model instance should use the {@link slic.model.Equipo} interface instead.
	 */
	public EquipoImpl() {
	}
	
	public CategoriaDisciplina getCategoriaDisciplina() throws PortalException, SystemException {
		CategoriaDisciplina categoriaDisciplina = CategoriaDisciplinaLocalServiceUtil.getCategoriaDisciplina(getCategoriaId());
		return categoriaDisciplina;
	}
	
	@Override
	public boolean equals(Object obj) {
        if (obj == null)
            return false;
        if (obj == this)
            return true;
        if (!(obj instanceof Equipo))
            return false;

        Equipo otroEquipo = (Equipo) obj;
        return getEquipoId() == otroEquipo.getEquipoId();
	}
	
}